<!doctype html>
<html lang="zh-cn" dir="ltr">
 <head> 
  <meta charset="UTF-8"> 
  <title>微信卡券接口说明 - 微信公众平台开发者文档</title> 
  <meta name="generator" content="MediaWiki 1.17.0"> 
  <link rel="shortcut icon" href="../static/assets/b6e57135e9c7167976dba80b3b09b546.jpg"> 
  <link rel="search" type="application/opensearchdescription+xml" href="../7/62453c80507e836458b441eae4358bdf.html" title="微信公众平台开发者文档 (zh-cn)"> 
  <link rel="alternate" type="application/atom+xml" title="微信公众平台开发者文档的Atom订阅" href="../0/594277f21545345653eb965322ac4b04.html"> 
  <link rel="stylesheet" href="../static/02da6b362196e50cd396d4117c7fa3ea.css"> 
  <meta name="keywords" content="微信公众平台开发者文档,微信小店接口,设备功能接口,Weixin JS接口,分组管理接口">
  <meta name="description" content="公众平台是为微信用户提供服务的平台，而公众平台开发接口则是提供服务的基础，开发者在公众平台网站中创建公众号、获取接口权限后，可以通过阅读本接口文档来帮助开发。">
  <meta name="ResourceLoaderDynamicStyles" content=""> 
  <!--[if lt IE 7]><style type="text/css">body{behavior:url("/wiki/skins/vector/csshover.min.htc")}</style><![endif]-->
 </head> 
 <body class="mediawiki ltr ns-0 ns-subject page-微信卡券接口说明 skin-vector"> 
  <!--网站头部--> 
  <script type="text/javascript" src="../static/021402488e80774f4bae632d50abd818.js"></script> 
  <script>
	function parseURL(){
		var res = {}, search = location.search;
		if (search.indexOf("?") != 0){
			return res;
		}
		search = search.substr(1).split("&");
		for (var i = 0; i < search.length; ++i){
			var 
				item = search[i],
				idx = item.indexOf("="),
				k = item.substr(0, idx),
				v = item.substr(idx+1);
			res[k] = v;
		}
		return res;
	}

	var params = parseURL();
	$(function(){
		$(".portal").each(function(){
			var portal = $(this), as = portal.find('a');

			as.each(function(){
				var a = $(this), title = a.html();

				if (decodeURIComponent(title) == decodeURIComponent(params['title'])){
					portal.addClass("active").find(".body").show();
					a.addClass("selected");
				}
			});
		})
	});
</script> 
  <div class="headWrap"> 
   <div class="header" id="header"> 
    <div class="inner"> 
     <a class="logo" href="../home/index.html"><img src="../static/assets/dc5de672083b2ec495408b00b96c9aab.png" alt="微信公众平台开发者文档"></a> 
    </div> 
   </div> 
  </div>  
  <script type="text/javascript" src="../static/2ef2bdf6ac1839ee639cb15463231282.js"></script> 
  <!--[if IE 6]>
<style type="text/css">
html{background-image:url(about:blank);background-attachment:fixed;}
#content{overflow-x:hidden;}
.bottomnav{position:absolute;top:expression(eval(document.documentElement.scrollTop+document.documentElement.clientHeight-30));}
</style>
<![endif]--> 
  <!--网站头部--> 
  <div id="mw-page-base" class="noprint"></div> 
  <div id="mw-head-base" class="noprint"></div> 
  <div class="mainwrapper"> 
   <div class="inner"> 
    <!-- panel --> 
    <div id="mw-panel" class="noprint"> 
     <!-- 
						<div id="p-logo"><a style="background-image: url(/wiki/skins/common/images/logo.jpg);" href="/wiki/index.php?title=%E9%A6%96%E9%A1%B5"  title="访问首页"></a></div>
					
					<form class="searchform">
						<input type="text"   name="search" placeholder="搜索关键字 [alt-s]" accesskey="s" class="searchform_text"/>
						<input type="submit" name="fulltext" value="搜索" title="搜索该文字的页面" class="searchform_btn"/>
					</form>
					 --> 
     <!-- 开始前必读 --> 
     <div class="portal" id="p-.E5.BC.80.E5.A7.8B.E5.89.8D.E5.BF.85.E8.AF.BB"> 
      <h5><span class="portal_arrow"></span>开始前必读</h5> 
      <div class="body"> 
       <ul> 
        <li id="n-.E6.9B.B4.E6.96.B0.E6.97.A5.E5.BF.97"><a href="../0/4c93e31f953f24a42b921d2ae8d4e5e0.html">更新日志</a></li> 
        <li id="n-.E5.BC.80.E5.8F.91.E8.80.85.E8.A7.84.E8.8C.83"><a href="../16/52e198333f5c127ddd5c45e875191b14.html">开发者规范</a></li> 
        <li id="n-.E5.85.AC.E4.BC.97.E5.8F.B7.E6.8E.A5.E5.8F.A3.E6.9D.83.E9.99.90.E8.AF.B4.E6.98.8E"><a href="../13/8d4957b72037e3308a0ca1b21f25ae8d.html">公众号接口权限说明</a></li> 
        <li id="n-.E6.8E.A5.E5.8F.A3.E9.A2.91.E7.8E.87.E9.99.90.E5.88.B6.E8.AF.B4.E6.98.8E"><a href="../7/85eff372c164ddc66c47777dc972279f.html">接口频率限制说明</a></li> 
        <li id="n-.E6.8E.A5.E5.8F.A3.E8.BF.94.E5.9B.9E.E7.A0.81.E8.AF.B4.E6.98.8E"><a href="../10/6380dc743053a91c544ffd2b7c959166.html">接口返回码说明</a></li> 
       </ul> 
      </div> 
     </div> 
     <!-- /开始前必读 --> 
     <!-- 开始开发 --> 
     <div class="portal" id="p-.E5.BC.80.E5.A7.8B.E5.BC.80.E5.8F.91"> 
      <h5><span class="portal_arrow"></span>开始开发</h5> 
      <div class="body"> 
       <ul> 
        <li id="n-.E6.8E.A5.E5.85.A5.E6.8C.87.E5.8D.97"><a href="../8/f9a0b8382e0b77d87b3bcc1ce6fbc104.html">接入指南</a></li> 
        <li id="n-.E8.8E.B7.E5.8F.96.E6.8E.A5.E5.8F.A3.E8.B0.83.E7.94.A8.E5.87.AD.E6.8D.AE"><a href="../14/9f9c82c1af308e3b14ba9b973f99a8ba.html">获取接口调用凭据</a></li> 
        <li id="n-.E8.8E.B7.E5.8F.96.E5.BE.AE.E4.BF.A1.E6.9C.8D.E5.8A.A1.E5.99.A8IP.E5.9C.B0.E5.9D.80"><a href="../4/41ef0843d6e108cf6b5649480207561c.html">获取微信服务器IP地址</a></li> 
        <li id="n-.E6.8A.A5.E8.AD.A6.E6.8E.92.E6.9F.A5.E6.8C.87.E5.BC.95"><a href="../7/c478375fae59150b26def82ec061f43b.html">报警排查指引</a></li> 
        <li id="n-.E6.8E.A5.E5.8F.A3.E6.B5.8B.E8.AF.95.E5.8F.B7.E7.94.B3.E8.AF.B7"><a href="http://mp.weixin.qq.com/debug/cgi-bin/sandbox?t=sandbox/login">接口测试号申请</a></li> 
        <li id="n-.E6.8E.A5.E5.8F.A3.E5.9C.A8.E7.BA.BF.E8.B0.83.E8.AF.95"><a href="http://mp.weixin.qq.com/debug/">接口在线调试</a></li> 
        <li id="n-.E5.B8.B8.E8.A7.81.E9.97.AE.E9.A2.98"><a href="http://mp.weixin.qq.com/qa">常见问题</a></li> 
       </ul> 
      </div> 
     </div> 
     <!-- /开始开发 --> 
     <!-- 自定义菜单 --> 
     <div class="portal" id="p-.E8.87.AA.E5.AE.9A.E4.B9.89.E8.8F.9C.E5.8D.95"> 
      <h5><span class="portal_arrow"></span>自定义菜单</h5> 
      <div class="body"> 
       <ul> 
        <li id="n-.E8.87.AA.E5.AE.9A.E4.B9.89.E8.8F.9C.E5.8D.95.E5.88.9B.E5.BB.BA.E6.8E.A5.E5.8F.A3"><a href="../10/0234e39a2025342c17a7d23595c6b40a.html">自定义菜单创建接口</a></li> 
        <li id="n-.E8.87.AA.E5.AE.9A.E4.B9.89.E8.8F.9C.E5.8D.95.E6.9F.A5.E8.AF.A2.E6.8E.A5.E5.8F.A3"><a href="../5/f287d1a5b78a35a8884326312ac3e4ed.html">自定义菜单查询接口</a></li> 
        <li id="n-.E8.87.AA.E5.AE.9A.E4.B9.89.E8.8F.9C.E5.8D.95.E5.88.A0.E9.99.A4.E6.8E.A5.E5.8F.A3"><a href="../3/de21624f2d0d3dafde085dafaa226743.html">自定义菜单删除接口</a></li> 
        <li id="n-.E8.87.AA.E5.AE.9A.E4.B9.89.E8.8F.9C.E5.8D.95.E4.BA.8B.E4.BB.B6.E6.8E.A8.E9.80.81"><a href="../19/a037750e2df0261ab0a84899d16abd33.html">自定义菜单事件推送</a></li> 
        <li id="n-.E4.B8.AA.E6.80.A7.E5.8C.96.E8.8F.9C.E5.8D.95.E6.8E.A5.E5.8F.A3"><a href="../0/c48ccd12b69ae023159b4bfaa7c39c20.html">个性化菜单接口</a></li> 
        <li id="n-.E8.8E.B7.E5.8F.96.E5.85.AC.E4.BC.97.E5.8F.B7.E7.9A.84.E8.8F.9C.E5.8D.95.E9.85.8D.E7.BD.AE"><a href="../14/293d0cb8de95e916d1216a33fcb81fd6.html">获取公众号的菜单配置</a></li> 
       </ul> 
      </div> 
     </div> 
     <!-- /自定义菜单 --> 
     <!-- 消息管理 --> 
     <div class="portal" id="p-.E6.B6.88.E6.81.AF.E7.AE.A1.E7.90.86"> 
      <h5><span class="portal_arrow"></span>消息管理</h5> 
      <div class="body"> 
       <ul> 
        <li id="n-.E6.8E.A5.E6.94.B6.E6.B6.88.E6.81.AF-.E6.8E.A5.E6.94.B6.E6.99.AE.E9.80.9A.E6.B6.88.E6.81.AF"><a href="../17/f298879f8fb29ab98b2f2971d42552fd.html">接收消息-接收普通消息</a></li> 
        <li id="n-.E6.8E.A5.E6.94.B6.E6.B6.88.E6.81.AF-.E6.8E.A5.E6.94.B6.E4.BA.8B.E4.BB.B6.E6.8E.A8.E9.80.81"><a href="../7/9f89d962eba4c5924ed95b513ba69d9b.html">接收消息-接收事件推送</a></li> 
        <li id="n-.E5.8F.91.E9.80.81.E6.B6.88.E6.81.AF-.E8.A2.AB.E5.8A.A8.E5.9B.9E.E5.A4.8D.E6.B6.88.E6.81.AF"><a href="../1/6239b44c206cab9145b1d52c67e6c551.html">发送消息-被动回复消息</a></li> 
        <li id="n-.E5.8F.91.E9.80.81.E6.B6.88.E6.81.AF-.E8.A2.AB.E5.8A.A8.E5.9B.9E.E5.A4.8D.E6.97.B6.E7.9A.84.E5.8A.A0.E8.A7.A3.E5.AF.86"><a href="../14/70e73cedf9fd958d2e23264ba9333ad2.html">发送消息-被动回复时的加解密</a></li> 
        <li id="n-.E5.8F.91.E9.80.81.E6.B6.88.E6.81.AF-.E5.AE.A2.E6.9C.8D.E6.B6.88.E6.81.AF"><a href="../11/c88c270ae8935291626538f9c64bd123.html">发送消息-客服消息</a></li> 
        <li id="n-.E5.8F.91.E9.80.81.E6.B6.88.E6.81.AF-.E7.BE.A4.E5.8F.91.E6.8E.A5.E5.8F.A3"><a href="../15/40b6865b893947b764e2de8e4a1fb55f.html">发送消息-群发接口</a></li> 
        <li id="n-.E5.8F.91.E9.80.81.E6.B6.88.E6.81.AF-.E6.A8.A1.E6.9D.BF.E6.B6.88.E6.81.AF.E6.8E.A5.E5.8F.A3"><a href="../5/6dde9eaa909f83354e0094dc3ad99e05.html">发送消息-模板消息接口</a></li> 
        <li id="n-.E5.8F.91.E9.80.81.E6.B6.88.E6.81.AF-.E6.A8.A1.E6.9D.BF.E6.B6.88.E6.81.AF.E8.BF.90.E8.90.A5.E8.A7.84.E8.8C.83"><a href="../18/8ecd0dfc9acafb2ed86ac3ae8f7c69aa.html">发送消息-模板消息运营规范</a></li> 
        <li id="n-.E8.8E.B7.E5.8F.96.E5.85.AC.E4.BC.97.E5.8F.B7.E8.87.AA.E5.8A.A8.E5.9B.9E.E5.A4.8D.E9.85.8D.E7.BD.AE"><a href="../8/806878e1fc2b9e9aa618ae33896b04c4.html">获取公众号自动回复配置</a></li> 
       </ul> 
      </div> 
     </div> 
     <!-- /消息管理 --> 
     <!-- 微信网页开发 --> 
     <div class="portal" id="p-.E5.BE.AE.E4.BF.A1.E7.BD.91.E9.A1.B5.E5.BC.80.E5.8F.91"> 
      <h5><span class="portal_arrow"></span>微信网页开发</h5> 
      <div class="body"> 
       <ul> 
        <li id="n-.E5.BE.AE.E4.BF.A1.E7.BD.91.E9.A1.B5.E6.8E.88.E6.9D.83"><a href="../4/9ac2e7b1f1d22e9e57260f6553822520.html">微信网页授权</a></li> 
        <li id="n-.E5.BE.AE.E4.BF.A1.E7.BD.91.E9.A1.B5.E5.BC.80.E5.8F.91.E6.A0.B7.E5.BC.8F.E5.BA.93"><a href="../2/ae9782fb42e47ad79eb7b361c2149d16.html">微信网页开发样式库</a></li> 
        <li id="n-.E5.BE.AE.E4.BF.A1JS-SDK"><a href="../11/74ad127cc054f6b80759c40f77ec03db.html">微信JS-SDK</a></li> 
        <li id="n-.E5.BE.AE.E4.BF.A1Web.E5.BC.80.E5.8F.91.E8.80.85.E5.B7.A5.E5.85.B7"><a href="../10/e5f772f4521da17fa0d7304f68b97d7e.html">微信Web开发者工具</a></li> 
       </ul> 
      </div> 
     </div> 
     <!-- /微信网页开发 --> 
     <!-- 素材管理 --> 
     <div class="portal" id="p-.E7.B4.A0.E6.9D.90.E7.AE.A1.E7.90.86"> 
      <h5><span class="portal_arrow"></span>素材管理</h5> 
      <div class="body"> 
       <ul> 
        <li id="n-.E6.96.B0.E5.A2.9E.E4.B8.B4.E6.97.B6.E7.B4.A0.E6.9D.90"><a href="../15/2d353966323806a202cd2deaafe8e557.html">新增临时素材</a></li> 
        <li id="n-.E8.8E.B7.E5.8F.96.E4.B8.B4.E6.97.B6.E7.B4.A0.E6.9D.90"><a href="../9/677a85e3f3849af35de54bb5516c2521.html">获取临时素材</a></li> 
        <li id="n-.E6.96.B0.E5.A2.9E.E6.B0.B8.E4.B9.85.E7.B4.A0.E6.9D.90"><a href="../10/10ea5a44870f53d79449290dfd43d006.html">新增永久素材</a></li> 
        <li id="n-.E8.8E.B7.E5.8F.96.E6.B0.B8.E4.B9.85.E7.B4.A0.E6.9D.90"><a href="../12/3c12fac7c14cb4d0e0d4fe2fbc87b638.html">获取永久素材</a></li> 
        <li id="n-.E5.88.A0.E9.99.A4.E6.B0.B8.E4.B9.85.E7.B4.A0.E6.9D.90"><a href="../7/2212203f4e17253b9aef77dc788f5337.html">删除永久素材</a></li> 
        <li id="n-.E4.BF.AE.E6.94.B9.E6.B0.B8.E4.B9.85.E5.9B.BE.E6.96.87.E7.B4.A0.E6.9D.90"><a href="../10/c7bad9a463db20ff8ccefeedeef51f9e.html">修改永久图文素材</a></li> 
        <li id="n-.E8.8E.B7.E5.8F.96.E7.B4.A0.E6.9D.90.E6.80.BB.E6.95.B0"><a href="../5/a641fd7b5db7a6a946ebebe2ac166885.html">获取素材总数</a></li> 
        <li id="n-.E8.8E.B7.E5.8F.96.E7.B4.A0.E6.9D.90.E5.88.97.E8.A1.A8"><a href="../15/8386c11b7bc4cdd1499c572bfe2e95b3.html">获取素材列表</a></li> 
       </ul> 
      </div> 
     </div> 
     <!-- /素材管理 --> 
     <!-- 用户管理 --> 
     <div class="portal" id="p-.E7.94.A8.E6.88.B7.E7.AE.A1.E7.90.86"> 
      <h5><span class="portal_arrow"></span>用户管理</h5> 
      <div class="body"> 
       <ul> 
        <li id="n-.E7.94.A8.E6.88.B7.E5.88.86.E7.BB.84.E7.AE.A1.E7.90.86"><a href="../8/d6d33cf60bce2a2e4fb10a21be9591b8.html">用户分组管理</a></li> 
        <li id="n-.E8.AE.BE.E7.BD.AE.E7.94.A8.E6.88.B7.E5.A4.87.E6.B3.A8.E5.90.8D"><a href="../16/528098c4a6a87b05120a7665c8db0460.html">设置用户备注名</a></li> 
        <li id="n-.E8.8E.B7.E5.8F.96.E7.94.A8.E6.88.B7.E5.9F.BA.E6.9C.AC.E4.BF.A1.E6.81.AF.28UnionID.E6.9C.BA.E5.88.B6.29"><a href="../1/8a5ce6257f1d3b2afb20f83e72b72ce9.html">获取用户基本信息(UnionID机制)</a></li> 
        <li id="n-.E8.8E.B7.E5.8F.96.E7.94.A8.E6.88.B7.E5.88.97.E8.A1.A8"><a href="../12/54773ff6da7b8bdc95b7d2667d84b1d4.html">获取用户列表</a></li> 
        <li id="n-.E8.8E.B7.E5.8F.96.E7.94.A8.E6.88.B7.E5.9C.B0.E7.90.86.E4.BD.8D.E7.BD.AE"><a href="../4/0bd25e04332eccf83bc2e71df9d3e860.html">获取用户地理位置</a></li> 
       </ul> 
      </div> 
     </div> 
     <!-- /用户管理 --> 
     <!-- 帐号管理 --> 
     <div class="portal" id="p-.E5.B8.90.E5.8F.B7.E7.AE.A1.E7.90.86"> 
      <h5><span class="portal_arrow"></span>帐号管理</h5> 
      <div class="body"> 
       <ul> 
        <li id="n-.E7.94.9F.E6.88.90.E5.B8.A6.E5.8F.82.E6.95.B0.E7.9A.84.E4.BA.8C.E7.BB.B4.E7.A0.81"><a href="../18/167e7d94df85d8389df6c94a7a8f78ba.html">生成带参数的二维码</a></li> 
        <li id="n-.E9.95.BF.E9.93.BE.E6.8E.A5.E8.BD.AC.E7.9F.AD.E9.93.BE.E6.8E.A5.E6.8E.A5.E5.8F.A3"><a href="../6/856aaeb492026466277ea39233dc23ee.html">长链接转短链接接口</a></li> 
        <li id="n-.E5.BE.AE.E4.BF.A1.E8.AE.A4.E8.AF.81.E4.BA.8B.E4.BB.B6.E6.8E.A8.E9.80.81"><a href="../10/2adfb2f10828e87aa1e5c3ef83b17906.html">微信认证事件推送</a></li> 
       </ul> 
      </div> 
     </div> 
     <!-- /帐号管理 --> 
     <!-- 数据统计 --> 
     <div class="portal" id="p-.E6.95.B0.E6.8D.AE.E7.BB.9F.E8.AE.A1"> 
      <h5><span class="portal_arrow"></span>数据统计</h5> 
      <div class="body"> 
       <ul> 
        <li id="n-.E7.94.A8.E6.88.B7.E5.88.86.E6.9E.90.E6.95.B0.E6.8D.AE.E6.8E.A5.E5.8F.A3"><a href="../15/88726a421bfc54654a3095821c3ca3bb.html">用户分析数据接口</a></li> 
        <li id="n-.E5.9B.BE.E6.96.87.E5.88.86.E6.9E.90.E6.95.B0.E6.8D.AE.E6.8E.A5.E5.8F.A3"><a href="../9/d347c6ddb6f86ab11ec3b41c2729c8d9.html">图文分析数据接口</a></li> 
        <li id="n-.E6.B6.88.E6.81.AF.E5.88.86.E6.9E.90.E6.95.B0.E6.8D.AE.E6.8E.A5.E5.8F.A3"><a href="../10/b29e8ca8bf1b0dce033ccb70273f90fa.html">消息分析数据接口</a></li> 
        <li id="n-.E6.8E.A5.E5.8F.A3.E5.88.86.E6.9E.90.E6.95.B0.E6.8D.AE.E6.8E.A5.E5.8F.A3"><a href="../17/252a976f20bd3062af3f03a45f30cff9.html">接口分析数据接口</a></li> 
       </ul> 
      </div> 
     </div> 
     <!-- /数据统计 --> 
     <!-- 微信小店 --> 
     <div class="portal" id="p-.E5.BE.AE.E4.BF.A1.E5.B0.8F.E5.BA.97"> 
      <h5><span class="portal_arrow"></span>微信小店</h5> 
      <div class="body"> 
       <ul> 
        <li id="n-.E5.BE.AE.E4.BF.A1.E5.B0.8F.E5.BA.97.E6.8E.A5.E5.8F.A3"><a href="../6/ae98ac4a7219405153cedc9dddccacca.html">微信小店接口</a></li> 
       </ul> 
      </div> 
     </div> 
     <!-- /微信小店 --> 
     <!-- 微信卡券 --> 
     <div class="portal" id="p-.E5.BE.AE.E4.BF.A1.E5.8D.A1.E5.88.B8"> 
      <h5><span class="portal_arrow"></span>微信卡券</h5> 
      <div class="body"> 
       <ul> 
        <li id="n-.E5.BE.AE.E4.BF.A1.E5.8D.A1.E5.88.B8.E6.8E.A5.E5.8F.A3.E8.AF.B4.E6.98.8E"><a href="../10/597cb57750f375a4b37e2536fd3331ea.html">微信卡券接口说明</a></li> 
        <li id="n-.E5.88.9B.E5.BB.BA.E5.8D.A1.E5.88.B8"><a href="../15/e33671f4ef511b77755142b37502928f.html">创建卡券</a></li> 
        <li id="n-.E6.8A.95.E6.94.BE.E5.8D.A1.E5.88.B8"><a href="../5/f942979ef2f0d313d4d36e3a26766a3d.html">投放卡券</a></li> 
        <li id="n-.E6.A0.B8.E9.94.80.E5.8D.A1.E5.88.B8"><a href="../15/bdfd0c3c6c3b0629e8a425936a973d8b.html">核销卡券</a></li> 
        <li id="n-.E7.AE.A1.E7.90.86.E5.8D.A1.E5.88.B8"><a href="../14/8dd77aeaee85f922db5f8aa6386d385e.html">管理卡券</a></li> 
        <li id="n-.E5.8D.A1.E5.88.B8.E4.BA.8B.E4.BB.B6.E6.8E.A8.E9.80.81"><a href="../16/28b34ee91675a04cb24853768debded4.html">卡券事件推送</a></li> 
        <li id="n-.E6.9C.8B.E5.8F.8B.E7.9A.84.E5.88.B8.E4.B8.93.E5.8C.BA"><a href="../10/333958907c5aae0581e93a24f2df8562.html">朋友的券专区</a></li> 
        <li id="n-.E4.BC.9A.E5.91.98.E5.8D.A1.E4.B8.93.E5.8C.BA"><a href="../15/de148cc4b5190c80002eaf4f6f26c717.html">会员卡专区</a></li> 
        <li id="n-.E7.89.B9.E6.AE.8A.E7.A5.A8.E5.88.B8"><a href="../11/a42da6431597edff7caeaf5d33fac37b.html">特殊票券</a></li> 
        <li id="n-.E7.AC.AC.E4.B8.89.E6.96.B9.E4.BB.A3.E5.88.B6.E4.B8.93.E5.8C.BA"><a href="../13/a1b2bedbca3990108195f13bd7e27401.html">第三方代制专区</a></li> 
        <li id="n-.E5.8D.A1.E5.88.B8.E9.94.99.E8.AF.AF.E7.A0.81"><a href="../7/981e7a73e2bca37a3d1c83f071be6947.html">卡券错误码</a></li> 
       </ul> 
      </div> 
     </div> 
     <!-- /微信卡券 --> 
     <!-- 微信门店 --> 
     <div class="portal" id="p-.E5.BE.AE.E4.BF.A1.E9.97.A8.E5.BA.97"> 
      <h5><span class="portal_arrow"></span>微信门店</h5> 
      <div class="body"> 
       <ul> 
        <li id="n-.E5.BE.AE.E4.BF.A1.E9.97.A8.E5.BA.97.E6.8E.A5.E5.8F.A3"><a href="../11/081986f089826bf94393bef9bf287b8b.html">微信门店接口</a></li> 
       </ul> 
      </div> 
     </div> 
     <!-- /微信门店 --> 
     <!-- 微信智能接口 --> 
     <div class="portal" id="p-.E5.BE.AE.E4.BF.A1.E6.99.BA.E8.83.BD.E6.8E.A5.E5.8F.A3"> 
      <h5><span class="portal_arrow"></span>微信智能接口</h5> 
      <div class="body"> 
       <ul> 
        <li id="n-.E8.AF.AD.E4.B9.89.E7.90.86.E8.A7.A3.E6.8E.A5.E5.8F.A3"><a href="../10/65eb7a43f078cc609cf08dae6805f4a6.html">语义理解接口</a></li> 
       </ul> 
      </div> 
     </div> 
     <!-- /微信智能接口 --> 
     <!-- 微信设备功能 --> 
     <div class="portal" id="p-.E5.BE.AE.E4.BF.A1.E8.AE.BE.E5.A4.87.E5.8A.9F.E8.83.BD"> 
      <h5><span class="portal_arrow"></span>微信设备功能</h5> 
      <div class="body"> 
       <ul> 
        <li id="n-.E8.AE.BE.E5.A4.87.E5.8A.9F.E8.83.BD.E4.BB.8B.E7.BB.8D"><a href="../2/77400d13dc7fca83181bc9806d55b6ce.html">设备功能介绍</a></li> 
       </ul> 
      </div> 
     </div> 
     <!-- /微信设备功能 --> 
     <!-- 微信多客服功能 --> 
     <div class="portal" id="p-.E5.BE.AE.E4.BF.A1.E5.A4.9A.E5.AE.A2.E6.9C.8D.E5.8A.9F.E8.83.BD"> 
      <h5><span class="portal_arrow"></span>微信多客服功能</h5> 
      <div class="body"> 
       <ul> 
        <li id="n-.E5.B0.86.E6.B6.88.E6.81.AF.E8.BD.AC.E5.8F.91.E5.88.B0.E5.A4.9A.E5.AE.A2.E6.9C.8D"><a href="../11/f0e34a15cec66fefb28cf1c0388f68ab.html">将消息转发到多客服</a></li> 
        <li id="n-.E5.AE.A2.E6.9C.8D.E7.AE.A1.E7.90.86"><a href="../18/749901f4e123170fb8a4d447ae6040ba.html">客服管理</a></li> 
        <li id="n-.E5.A4.9A.E5.AE.A2.E6.9C.8D.E4.BC.9A.E8.AF.9D.E6.8E.A7.E5.88.B6"><a href="../4/4b256cfb246b22ad020e07cf8a61a738.html">多客服会话控制</a></li> 
        <li id="n-.E8.8E.B7.E5.8F.96.E5.AE.A2.E6.9C.8D.E8.81.8A.E5.A4.A9.E8.AE.B0.E5.BD.95"><a href="../3/178d2982bd590adf33fc03cf6cf45b33.html">获取客服聊天记录</a></li> 
        <li id="n-PC.E5.AE.A2.E6.88.B7.E7.AB.AF.E8.87.AA.E5.AE.9A.E4.B9.89.E6.8F.92.E4.BB.B6.E6.8E.A5.E5.8F.A3"><a href="../8/3634566e351f497f508c7b9d04636724.html">PC客户端自定义插件接口</a></li> 
       </ul> 
      </div> 
     </div> 
     <!-- /微信多客服功能 --> 
     <!-- 微信摇一摇周边 --> 
     <div class="portal" id="p-.E5.BE.AE.E4.BF.A1.E6.91.87.E4.B8.80.E6.91.87.E5.91.A8.E8.BE.B9"> 
      <h5><span class="portal_arrow"></span>微信摇一摇周边</h5> 
      <div class="body"> 
       <ul> 
        <li id="n-.E7.94.B3.E8.AF.B7.E5.BC.80.E9.80.9A.E6.91.87.E4.B8.80.E6.91.87.E5.91.A8.E8.BE.B9"><a href="../19/9fe9fdbb50fee9f9660438c551142ccf.html">申请开通摇一摇周边</a></li> 
        <li id="n-.E8.AE.BE.E5.A4.87.E7.AE.A1.E7.90.86"><a href="../15/095caa2f4a829f0299db617eaf6ad1cf.html">设备管理</a></li> 
        <li id="n-.E9.A1.B5.E9.9D.A2.E7.AE.A1.E7.90.86"><a href="../15/7a21268ed234b4e648d86e3b91118907.html">页面管理</a></li> 
        <li id="n-.E7.B4.A0.E6.9D.90.E7.AE.A1.E7.90.86"><a href="../12/3b10084ee944a702fd06e54a0f10b1d8.html">素材管理</a></li> 
        <li id="n-.E7.AE.A1.E7.90.86.E8.AE.BE.E5.A4.87.E4.B8.8E.E9.A1.B5.E9.9D.A2.E7.9A.84.E5.85.B3.E8.81.94.E5.85.B3.E7.B3.BB"><a href="../6/0eb3f80f152d2edb95287141e7a6ab5e.html">管理设备与页面的关联关系</a></li> 
        <li id="n-.E8.8E.B7.E5.8F.96.E8.AE.BE.E5.A4.87.E5.8F.8A.E7.94.A8.E6.88.B7.E4.BF.A1.E6.81.AF"><a href="../12/f18e741c4cab6652afe3878774672de4.html">获取设备及用户信息</a></li> 
        <li id="n-.E6.95.B0.E6.8D.AE.E7.BB.9F.E8.AE.A1"><a href="../3/15da0147e3722fd689f363497af0c707.html">数据统计</a></li> 
        <li id="n-.E6.91.87.E4.B8.80.E6.91.87.E5.85.B3.E6.B3.A8JSAPI"><a href="../4/94e3b1dc0416633a2d7f1cfaa71240c8.html">摇一摇关注JSAPI</a></li> 
        <li id="n-.E6.91.87.E4.B8.80.E6.91.87.E4.BA.8B.E4.BB.B6.E9.80.9A.E7.9F.A5"><a href="../3/c71248e1b3efb158f258a48b72e67683.html">摇一摇事件通知</a></li> 
        <li id="n-.E6.91.87.E4.B8.80.E6.91.87.E7.BA.A2.E5.8C.85"><a href="../7/0ddd50ed2421b99fedd071281c074aab.html">摇一摇红包</a></li> 
        <li id="n-Html-5.E9.A1.B5.E9.9D.A2.E8.8E.B7.E5.8F.96.E8.AE.BE.E5.A4.87.E4.BF.A1.E6.81.AF"><a href="../11/c156a3e968b0c1e78157e15275dcc54b.html">Html 5页面获取设备信息</a></li> 
        <li id="n-.E6.91.87.E4.B8.80.E6.91.87.E5.91.A8.E8.BE.B9.E9.94.99.E8.AF.AF.E7.A0.81"><a href="../1/8299371e6e11392757b23a6d1e592331.html">摇一摇周边错误码</a></li> 
       </ul> 
      </div> 
     </div> 
     <!-- /微信摇一摇周边 --> 
     <!-- 微信连Wi-Fi --> 
     <div class="portal" id="p-.E5.BE.AE.E4.BF.A1.E8.BF.9EWi-Fi"> 
      <h5><span class="portal_arrow"></span>微信连Wi-Fi</h5> 
      <div class="body"> 
       <ul> 
        <li id="n-.E5.BE.AE.E4.BF.A1.E8.BF.9EWi-Fi.E5.BC.80.E5.8F.91.E8.80.85.E6.8C.87.E5.BC.95"><a href="../9/fd2d692e28b938a8d618f57cf9c79fb1.html">微信连Wi-Fi开发者指引</a></li> 
        <li id="n-Wi-Fi.E7.A1.AC.E4.BB.B6.E9.89.B4.E6.9D.83.E5.8D.8F.E8.AE.AE.E6.8E.A5.E5.8F.A3.E8.AF.B4.E6.98.8E"><a href="../10/0ef643c7147fdf689e0a780d8c08ab96.html">Wi-Fi硬件鉴权协议接口说明</a></li> 
        <li id="n-Wi-Fi.E8.BD.AF.E4.BB.B6.E6.9C.8D.E5.8A.A1.E7.AE.A1.E7.90.86.E6.8E.A5.E5.8F.A3.E8.AF.B4.E6.98.8E"><a href="../14/70e147b2ace3247f88f1c2aaaa57568e.html">Wi-Fi软件服务管理接口说明</a></li> 
        <li id="n-.E5.BC.80.E9.80.9A.E5.BE.AE.E4.BF.A1.E8.BF.9EWi-Fi.E6.8F.92.E4.BB.B6"><a href="../11/a6a3731b23ed4203f5d08030cd5bf4c3.html">开通微信连Wi-Fi插件</a></li> 
        <li id="n-Wi-Fi.E9.97.A8.E5.BA.97.E7.AE.A1.E7.90.86"><a href="../9/0afbb08a0f06e87dd3669a2c1e19edd5.html">Wi-Fi门店管理</a></li> 
        <li id="n-Wi-Fi.E8.AE.BE.E5.A4.87.E7.AE.A1.E7.90.86"><a href="../17/438e819a53e9426b202c3bc0afbad749.html">Wi-Fi设备管理</a></li> 
        <li id="n-.E9.85.8D.E7.BD.AE.E8.BF.9E.E7.BD.91.E6.96.B9.E5.BC.8F"><a href="../17/22648869929525f829a3de1bfc73eb4d.html">配置连网方式</a></li> 
        <li id="n-.E5.95.86.E5.AE.B6.E4.B8.BB.E9.A1.B5.E7.AE.A1.E7.90.86"><a href="../14/4e14adf8639aeb67d42df05cb792da9e.html">商家主页管理</a></li> 
        <li id="n-Wi-Fi.E6.95.B0.E6.8D.AE.E7.BB.9F.E8.AE.A1"><a href="../11/f5f481aeeb62b9b0848315f78123b4d7.html">Wi-Fi数据统计</a></li> 
        <li id="n-.E8.BF.9E.E7.BD.91.E5.90.8E.E4.B8.8B.E5.8F.91.E6.B6.88.E6.81.AF"><a href="../19/bac84e64da24f928c3e536c742d4e0b7.html">连网后下发消息</a></li> 
        <li id="n-Wi-Fi.E9.94.99.E8.AF.AF.E7.A0.81"><a href="../9/b1211ca9404ec481f94e88d0dd344e85.html">Wi-Fi错误码</a></li> 
       </ul> 
      </div> 
     </div> 
     <!-- /微信连Wi-Fi --> 
     <!-- 微信扫一扫 --> 
     <div class="portal" id="p-.E5.BE.AE.E4.BF.A1.E6.89.AB.E4.B8.80.E6.89.AB"> 
      <h5><span class="portal_arrow"></span>微信扫一扫</h5> 
      <div class="body"> 
       <ul> 
        <li id="n-.E6.89.AB.E4.B8.80.E6.89.AB.E6.8E.A5.E5.85.A5.E6.8C.87.E5.8D.97"><a href="../19/e833eb10470cc25cad4719677c46ecdb.html">扫一扫接入指南</a></li> 
        <li id="n-.E5.95.86.E5.93.81.E5.88.9B.E5.BB.BA"><a href="../6/c61604ff6890d386d6227945ad4a68d2.html">商品创建</a></li> 
        <li id="n-.E5.95.86.E5.93.81.E5.8F.91.E5.B8.83"><a href="../15/1007691d0f1c10a0588c6517f12ed70f.html">商品发布</a></li> 
        <li id="n-.E5.95.86.E5.93.81.E7.AE.A1.E7.90.86"><a href="../15/7fa787701295b884410b5163e13313af.html">商品管理</a></li> 
        <li id="n-.E6.89.AB.E4.B8.80.E6.89.AB.E4.BA.8B.E4.BB.B6.E6.8E.A8.E9.80.81"><a href="../15/f4109a5e44b4bfbc7eb1337eb739f3e3.html">扫一扫事件推送</a></li> 
        <li id="n-.E9.94.99.E8.AF.AF.E7.A0.81"><a href="../7/91dcb5ffa7d087a23299316c3c396e93.html">错误码</a></li> 
        <li id="n-.E5.9C.A8.E7.BA.BF.E5.B8.AE.E5.8A.A9.E5.B7.A5.E5.85.B7"><a href="../11/9f75990a5e9f6c09c846fd918921e0d7.html">在线帮助工具</a></li> 
        <li id="n-.E6.89.AB.E4.B8.80.E6.89.AB.E5.B8.B8.E8.A7.81.E9.97.AE.E9.A2.98"><a href="../15/b11cde45d1dcb23a94f493dd1e1320cb.html">扫一扫常见问题</a></li> 
       </ul> 
      </div> 
     </div> 
     <!-- /微信扫一扫 --> 
     <!-- SEARCH --> 
     <!-- /SEARCH --> 
     <!-- TOOLBOX --> 
     <!-- /TOOLBOX --> 
     <!-- LANGUAGES --> 
     <!-- /LANGUAGES --> 
    </div> 
    <!-- /panel --> 
    <!-- content --> 
    <div id="content"> 
     <!-- header --> 
     <div id="mw-head" class="noprint" style="visibility:hidden"> 
      <!-- 0 --> 
      <div id="p-personal" class=""> 
       <h5>个人工具</h5> 
       <ul> 
        <li id="pt-anonuserpage"><a href="../0/f33145bff5a2445cabbd49fc12e8f2e0.html" title="您编辑本站所用IP的对应用户页 [.]" accesskey="." class="new">10.9.161.40</a></li> 
        <li id="pt-anontalk"><a href="../12/4aa3e991f9670e48be3d9c6d01c4c568.html" title="对于来自此IP地址的编辑的对话 [n]" accesskey="n" class="new">该IP的讨论页</a></li> 
        <li id="pt-anonlogin"><a href="../12/7552b5ea88f3ef0d0988b8b71c936c34.html" title="我们鼓励您登录，但这并不是必须的 [o]" accesskey="o">登录</a></li> 
       </ul> 
      </div> 
      <!-- /0 --> 
      <div id="left-navigation"> 
       <!-- 0 --> 
       <div id="p-namespaces" class="vectorTabs"> 
        <h5>名字空间</h5> 
        <ul> 
         <li id="ca-nstab-main" class="selected"><span><a href="../10/597cb57750f375a4b37e2536fd3331ea.html" title="查看页面内容 [c]" accesskey="c">页面</a></span></li> 
         <li id="ca-talk" class="new"><span><a href="#" title="关于页面正文的讨论 [t]" accesskey="t">讨论</a></span></li> 
        </ul> 
       </div> 
       <!-- /0 --> 
       <!-- 1 --> 
       <div id="p-variants" class="vectorMenu emptyPortlet"> 
        <h5><span>变换</span><a href="#"></a></h5> 
        <div class="menu"> 
         <ul> 
         </ul> 
        </div> 
       </div> 
       <!-- /1 --> 
      </div> 
      <div id="right-navigation"> 
       <!-- 0 --> 
       <div id="p-views" class="vectorTabs"> 
        <h5>查看</h5> 
        <ul> 
         <li id="ca-view" class="selected"><span><a href="../10/597cb57750f375a4b37e2536fd3331ea.html">阅读</a></span></li> 
         <li id="ca-viewsource"><span><a href="#" title="此页面已被保护，你可以查看其源代码。 [e]" accesskey="e">查看源代码</a></span></li> 
         <li id="ca-history" class="collapsible "><span><a href="#" title="此页面的早前修订版本 [h]" accesskey="h">查看历史</a></span></li> 
        </ul> 
       </div> 
       <!-- /0 --> 
       <!-- 1 --> 
       <div id="p-cactions" class="vectorMenu emptyPortlet"> 
        <h5><span>动作</span><a href="#"></a></h5> 
        <div class="menu"> 
         <ul> 
         </ul> 
        </div> 
       </div> 
       <!-- /1 --> 
       <!-- 2 --> 
       <div id="p-search"> 
        <h5><label for="searchInput">搜索</label></h5> 
        <form action="/wiki/index.php" id="searchform"> 
         <input type="hidden" name="title" value="特殊:搜索"> 
         <input id="searchInput" name="search" type="text" title="搜索该网站 [f]" accesskey="f" value=""> 
         <input type="submit" name="go" class="searchButton" id="searchGoButton" value="进入" title="如果相同的标题存在的话便直接前往该页面"> 
         <input type="submit" name="fulltext" class="searchButton" id="mw-searchButton" value="搜索" title="搜索该文字的页面"> 
        </form> 
       </div> 
       <!-- /2 --> 
      </div> 
     </div> 
     <!-- /header --> 
     <a id="top"></a> 
     <div id="mw-js-message" style="display:none;"></div> 
     <!-- firstHeading --> 
     <div class="content_hd"> 
      <h2 id="firstHeading" class="">微信卡券接口说明</h2> 
      <div class="info"> 
      </div> 
     </div> 
     <!-- /firstHeading --> 
     <!-- bodyContent --> 
     <div id="bodyContent" class="bodyContent"> 
      <!-- tagline --> 
      <div id="siteSub">
       出自微信公众平台开发者文档
      </div> 
      <!-- /tagline --> 
      <!-- subtitle --> 
      <div id="contentSub"></div> 
      <!-- /subtitle --> 
      <!-- jumpto --> 
      <div id="jump-to-nav">
        跳转到： 
       <a href="#mw-head">导航</a>, 
       <a href="#p-search">搜索</a> 
      </div> 
      <!-- /jumpto --> 
      <!-- bodytext --> 
      <table id="toc" class="toc">
       <tbody>
        <tr>
         <td>
          <div id="toctitle">
           <h2>目录</h2>
          </div> 
          <ul> 
           <li class="toclevel-1 tocsection-1"><a href="#.E5.8D.A1.E5.88.B8.E6.8E.A5.E5.8F.A3.E6.A6.82.E8.BF.B0"><span class="tocnumber">1</span> <span class="toctext">卡券接口概述</span></a></li> 
           <li class="toclevel-1 tocsection-2"><a href="#.E5.8D.A1.E5.88.B8.E6.B5.8B.E8.AF.95.E6.B2.99.E7.AE.B1.E6.9C.BA.E5.88.B6"><span class="tocnumber">2</span> <span class="toctext">卡券测试沙箱机制</span></a></li> 
           <li class="toclevel-1 tocsection-3"><a href="#.E5.8D.A1.E5.88.B8HelloWorld"><span class="tocnumber">3</span> <span class="toctext">卡券HelloWorld</span></a> 
            <ul> 
             <li class="toclevel-2 tocsection-4"><a href="#.E5.BC.80.E5.8F.91.E8.80.85.E9.A1.BB.E7.9F.A5"><span class="tocnumber">3.1</span> <span class="toctext">开发者须知</span></a></li> 
             <li class="toclevel-2 tocsection-5"><a href="#.E8.8E.B7.E5.8F.96access_token"><span class="tocnumber">3.2</span> <span class="toctext">获取access_token</span></a></li> 
             <li class="toclevel-2 tocsection-6"><a href="#.E4.B8.8A.E4.BC.A0.E5.8D.A1.E5.88.B8logo"><span class="tocnumber">3.3</span> <span class="toctext">上传卡券logo</span></a></li> 
             <li class="toclevel-2 tocsection-7"><a href="#.E5.88.9B.E5.BB.BA.E5.8D.A1.E5.88.B8"><span class="tocnumber">3.4</span> <span class="toctext">创建卡券</span></a></li> 
             <li class="toclevel-2 tocsection-8"><a href="#.E5.88.9B.E5.BB.BA.E4.BA.8C.E7.BB.B4.E7.A0.81.E6.8A.95.E6.94.BE"><span class="tocnumber">3.5</span> <span class="toctext">创建二维码投放</span></a></li> 
             <li class="toclevel-2 tocsection-9"><a href="#.E6.98.BE.E7.A4.BA.E4.BA.8C.E7.BB.B4.E7.A0.81"><span class="tocnumber">3.6</span> <span class="toctext">显示二维码</span></a></li> 
             <li class="toclevel-2 tocsection-10"><a href="#.E8.AE.BE.E7.BD.AE.E6.B5.8B.E8.AF.95.E7.99.BD.E5.90.8D.E5.8D.95"><span class="tocnumber">3.7</span> <span class="toctext">设置测试白名单</span></a></li> 
             <li class="toclevel-2 tocsection-11"><a href="#.E6.A0.B8.E9.94.80.E5.8D.A1.E5.8A.B5"><span class="tocnumber">3.8</span> <span class="toctext">核销卡劵</span></a></li> 
            </ul> </li> 
           <li class="toclevel-1 tocsection-12"><a href="#.E5.BC.80.E5.8F.91.E8.80.85.E6.B3.A8.E6.84.8F.E4.BA.8B.E9.A1.B9"><span class="tocnumber">4</span> <span class="toctext">开发者注意事项</span></a> 
            <ul> 
             <li class="toclevel-2 tocsection-13"><a href="#.E5.BE.AE.E4.BF.A1.E7.89.88.E6.9C.AC.E5.88.A4.E6.96.AD"><span class="tocnumber">4.1</span> <span class="toctext">微信版本判断</span></a></li> 
             <li class="toclevel-2 tocsection-14"><a href="#.E5.8D.A1.E5.88.B8.E6.8A.95.E6.94.BE.E9.99.90.E5.88.B6"><span class="tocnumber">4.2</span> <span class="toctext">卡券投放限制</span></a></li> 
             <li class="toclevel-2 tocsection-15"><a href="#.E7.BC.96.E7.A0.81.E8.A7.84.E5.88.99"><span class="tocnumber">4.3</span> <span class="toctext">编码规则</span></a></li> 
             <li class="toclevel-2 tocsection-16"><a href="#.E8.81.94.E7.B3.BB.E6.88.91.E4.BB.AC"><span class="tocnumber">4.4</span> <span class="toctext">联系我们</span></a></li> 
            </ul> </li> 
           <li class="toclevel-1 tocsection-17"><a href="#.E5.8D.A1.E5.88.B8.E6.9C.AF.E8.AF.AD.E4.BB.8B.E7.BB.8D"><span class="tocnumber">5</span> <span class="toctext">卡券术语介绍</span></a></li> 
           <li class="toclevel-1 tocsection-18"><a href="#.E5.8D.A1.E5.88.B8.E8.B5.84.E6.96.99.E5.8C.85.E4.B8.8B.E8.BD.BD"><span class="tocnumber">6</span> <span class="toctext">卡券资料包下载</span></a></li> 
          </ul> </td>
        </tr>
       </tbody>
      </table> 
      <h1> <span class="mw-headline" id=".E5.8D.A1.E5.88.B8.E6.8E.A5.E5.8F.A3.E6.A6.82.E8.BF.B0"><b>卡券接口概述</b></span></h1> 
      <p>微信公众平台本次增加了微信卡券功能，开放接口供商家使用。 支持开发者调用接口创建多种类型的卡券，通过下发消息、二维码、JS-SDK等方式进行投放，在用户使用时通过API接口或卡券商户助手完成核销。 同时支持接口获取统计数据，以及各个环节给予开发者事件推送。 接口调用流程图如下： </p>
      <p><a href="#" class="image"><img alt="接口调用流程图.png" src="../static/assets/9a1a1baab16cb0adf662b18a4d0fe3f3.png" width="880" height="678"></a> </p> 
      <h1> <span class="mw-headline" id=".E5.8D.A1.E5.88.B8.E6.B5.8B.E8.AF.95.E6.B2.99.E7.AE.B1.E6.9C.BA.E5.88.B6"><b>卡券测试沙箱机制</b></span></h1> 
      <p>测试沙箱是一种测试账号生成机制，开发者可以登录<a href="http://mp.weixin.qq.com/debug/cgi-bin/sandboxinfo?action=showinfo&amp;t=sandbox/index" class="external text" rel="nofollow">接口测试号申请</a> 通过微信扫一扫获得一个全新的appid(已拥有卡券（包括朋友的券）创建权限)和appsecret用于卡券接口调用，该appid创建的卡券不会被通过，仅限于小范围测试，开发者不可用于其他用途。 </p> 
      <h1> <span class="mw-headline" id=".E5.8D.A1.E5.88.B8HelloWorld"><b>卡券HelloWorld</b></span></h1> 
      <h2> <span class="mw-headline" id=".E5.BC.80.E5.8F.91.E8.80.85.E9.A1.BB.E7.9F.A5">开发者须知</span></h2> 
      <p>开发者可以通过debug工具，快速完成创建卡券、投放卡券和核销卡券的流程， 若要深入了解卡券接口，则需要对对应的部分的文档详细阅读。 </p> 
      <h2> <span class="mw-headline" id=".E8.8E.B7.E5.8F.96access_token"><b>获取access_token</b></span></h2> 
      <p><b>debug页面获取</b> </p>
      <p>页面地址：<a href="http://mp.weixin.qq.com/debug/" class="external free" rel="nofollow">http://mp.weixin.qq.com/debug/</a> </p>
      <p>接口类型：基础支持 </p>
      <p>接口列表：获取access_token接口 </p>
      <p>注意事项：参数填写开发者的appid和secret </p>
      <p>点击检查问题，即可返回access_token，access_token的有效期是两小时，两小时之后须重新获取 </p>
      <p>接口地址：<a href="../14/9f9c82c1af308e3b14ba9b973f99a8ba.html" class="external text" rel="nofollow">获取access_token接口</a> </p> 
      <h2> <span class="mw-headline" id=".E4.B8.8A.E4.BC.A0.E5.8D.A1.E5.88.B8logo"><b>上传卡券logo</b></span></h2> 
      <p><b>debug页面获取</b> 页面地址：<a href="http://mp.weixin.qq.com/debug/" class="external free" rel="nofollow">http://mp.weixin.qq.com/debug/</a> </p>
      <p>接口类型：基础支持 </p>
      <p>接口列表：上传logo接口 </p>
      <p>access_token: 上一步获得的access_token </p>
      <p>buffer：你选择的图片 </p>
      <p>点击检查问题，即可获取图片url，在下一步创建卡劵的参数中需要 </p>
      <p>接口地址：<a href="../14/9f9c82c1af308e3b14ba9b973f99a8ba.html" class="external text" rel="nofollow">上传Logo接口</a> </p> 
      <h2> <span class="mw-headline" id=".E5.88.9B.E5.BB.BA.E5.8D.A1.E5.88.B8"><b>创建卡券</b></span></h2> 
      <p><b>debug页面创建</b> </p>
      <p>页面地址：<a href="http://mp.weixin.qq.com/debug/" class="external free" rel="nofollow">http://mp.weixin.qq.com/debug/</a> </p>
      <p>接口类型：卡劵接口 </p>
      <p>接口列表：创建卡劵接口 </p>
      <p>access_token:第一步获得的access_token </p>
      <p>json: 示例： </p> 
      <pre>{ 
"card": {
  "card_type": "GROUPON",
  "groupon": {
      "base_info": {
          "logo_url": 
"<a href="http://mmbiz.qpic.cn/mmbiz/iaL1LJM1mF9aRKPZJkmG8xXhiaHqkKSVMMWeN3hLut7X7hicFNjakmx" class="external free" rel="nofollow">http://mmbiz.qpic.cn/mmbiz/iaL1LJM1mF9aRKPZJkmG8xXhiaHqkKSVMMWeN3hLut7X7hicFNjakmx</a> ibMLGWpXrEXB33367o7zHN0CwngnQY7zb7g/0",
          "brand_name":"海底捞",
          "code_type":"CODE_TYPE_TEXT",
          "title": "132元双人火锅套餐",
          "sub_title": "周末狂欢必备",
          "color": "Color010",
          "notice": "使用时向服务员出示此券",
          "service_phone": "020-88888888",
          "description": "不可与其他优惠同享\n如需团购券发票，请在消费时向商户提出\n店内均可使用，仅限堂食",
          "date_info": {
              "type": "DATE_TYPE_FIX_TERM",
              "fixed_term": 15 ,
              "fixed_begin_term": 0
          },
          "sku": {
              "quantity": 500000
          },
          "get_limit": 3,
          "use_custom_code": false,
          "bind_openid": false,
          "can_share": true,
        "can_give_friend": true,
          "location_id_list"&nbsp;: [123, 12321, 345345],
          "custom_url_name": "立即使用",
          "custom_url": "<a href="http://www.qq.com" class="external free" rel="nofollow">http://www.qq.com</a>",
          "custom_url_sub_title": "6个汉字tips",
          "promotion_url_name": "更多优惠",
        "promotion_url": "<a href="http://www.qq.com" class="external free" rel="nofollow">http://www.qq.com</a>",
          "source": "大众点评"   
      },
      "deal_detail": "以下锅底2选1（有菌王锅、麻辣锅、大骨锅、番茄锅、清补凉锅、酸 菜鱼锅可选）：\n大锅1份 12元\n小锅2份 16元 "}
}
}
</pre> 
      <p>注意事项：date_info中用的是Unix时间戳，注意把begin_timestamp修改小于当前时间，end_timestamp修改成今天之后的时间，这样在后面核销卡劵测试才能成功 </p>
      <p>接口地址：<a href="../15/e33671f4ef511b77755142b37502928f.html#.E6.AD.A5.E9.AA.A4.E5.9B.9B.EF.BC.9A.E5.88.9B.E5.BB.BA.E5.8D.A1.E5.88.B8" class="external text" rel="nofollow">创建卡券接口</a> </p> 
      <h2> <span class="mw-headline" id=".E5.88.9B.E5.BB.BA.E4.BA.8C.E7.BB.B4.E7.A0.81.E6.8A.95.E6.94.BE"><b>创建二维码投放</b></span></h2> 
      <p><b>debug页面获取</b> </p>
      <p>页面地址：<a href="http://mp.weixin.qq.com/debug/" class="external free" rel="nofollow">http://mp.weixin.qq.com/debug/</a> </p>
      <p>接口类型：卡劵接口 </p>
      <p>接口列表：创建二维码ticket接口 </p>
      <p>access_token：第一步获得的access_token </p>
      <p>json示例： </p> 
      <pre>{
"action_name": "QR_CARD", 
"action_info": {
"card": {
"card_id": "po_2DjgJ2zrboM6SzK3qNuje5iWQ", 
	 	}
	}
}
</pre> 
      <p>接口地址：<a href="../5/f942979ef2f0d313d4d36e3a26766a3d.html#.E5.88.9B.E5.BB.BA.E4.BA.8C.E7.BB.B4.E7.A0.81.E6.8E.A5.E5.8F.A3" class="external text" rel="nofollow">创建二维码接口</a> </p> 
      <h2> <span class="mw-headline" id=".E6.98.BE.E7.A4.BA.E4.BA.8C.E7.BB.B4.E7.A0.81"><b>显示二维码</b></span></h2> 
      <p>在上一步的返回中点击字段show_qrcode_url字段中的链接，即可显示卡券领取二维码。 </p>
      <p>示例：<a href="https://mp.weixin.qq.com/cgi-bin/showqrcode?ticket=gQEr8ToAAAAAAAAAASxodHRwOi8vd2VpeGluLnFxLmNvbS9xLy1YV21CQi1sc3dUS0p1M3NjRjVuAAIE3kqwVQMEgDPhAQ==" class="external free" rel="nofollow">https://mp.weixin.qq.com/cgi-bin/showqrcode?ticket=gQEr8ToAAAAAAAAAASxodHRwOi8vd2VpeGluLnFxLmNvbS9xLy1YV21CQi1sc3dUS0p1M3NjRjVuAAIE3kqwVQMEgDPhAQ==</a> </p>
      <p>打开微信扫一扫，然后领取卡劵，如果显示卡劵未通过审核，那么需要下一步设置测试白名单，如果可以领取就忽略第六步。 </p> 
      <h2> <span class="mw-headline" id=".E8.AE.BE.E7.BD.AE.E6.B5.8B.E8.AF.95.E7.99.BD.E5.90.8D.E5.8D.95"><b>设置测试白名单</b></span></h2> 
      <p><b>debug页面获取</b> </p>
      <p>页面地址：<a href="http://mp.weixin.qq.com/debug/" class="external free" rel="nofollow">http://mp.weixin.qq.com/debug/</a> </p>
      <p>接口类型：卡劵接口 </p>
      <p>接口列表：设置测试白名单接口 </p>
      <p>access_token：第一步获得的access_token </p>
      <p>json示例： </p> 
      <pre>{ "username":["usr1","usr2"] }
</pre> 
      <p>注意事项：其中usr1，sur2是领取卡劵的微信号 </p>
      <p>接口地址：<a href="../5/f942979ef2f0d313d4d36e3a26766a3d.html#.E8.AE.BE.E7.BD.AE.E6.B5.8B.E8.AF.95.E7.99.BD.E5.90.8D.E5.8D.95" class="external text" rel="nofollow">设置白名单接口</a> </p> 
      <h2> <span class="mw-headline" id=".E6.A0.B8.E9.94.80.E5.8D.A1.E5.8A.B5"><b>核销卡劵</b></span></h2> 
      <p><b>debug页面获取</b> </p>
      <p>页面地址：<a href="http://mp.weixin.qq.com/debug/" class="external free" rel="nofollow">http://mp.weixin.qq.com/debug/</a> </p>
      <p>接口类型：卡劵接口 </p>
      <p>接口列表：核销卡劵接口 </p>
      <p>access_token：第一步获得的access_token </p>
      <p>json: 示例： </p> 
      <pre>{ "code"："759733467744" }
</pre> 
      <p>注意事项：仅支持审核通过且在有效期内的卡劵 接口地址：<a href="../15/bdfd0c3c6c3b0629e8a425936a973d8b.html#.E6.A0.B8.E9.94.80Code.E6.8E.A5.E5.8F.A3" class="external text" rel="nofollow">核销接口</a> </p>
      <p><br> </p> 
      <h1> <span class="mw-headline" id=".E5.BC.80.E5.8F.91.E8.80.85.E6.B3.A8.E6.84.8F.E4.BA.8B.E9.A1.B9"><b>开发者注意事项</b></span></h1> 
      <h3> <span class="mw-headline" id=".E5.BE.AE.E4.BF.A1.E7.89.88.E6.9C.AC.E5.88.A4.E6.96.AD"><b>微信版本判断</b></span></h3> 
      <p>由于微信6.0.2版本后才支持卡券功能模块，低版本用户调用JS-SDK无效。因此，微信团队建议商户通过user agent来确定用户当前的版本号后再调用添加至卡包JS-SDK接口。以iPhone版本为例，可以通过user agent可获取如下版本示例信息： </p> 
      <pre>"Mozilla/5.0(iphone;CPU iphone OS 5_1_1 like Mac OS X)     
AppleWebKit/534.46(KHTML,like Geocko)Mobile/9B206 MicroMessenger/6.0.2 "
</pre> 
      <p>其中6.0.2为用户安装的微信版本号。商户可以判定版本号是否高于或者等于6.0.2。 </p> 
      <h3> <span class="mw-headline" id=".E5.8D.A1.E5.88.B8.E6.8A.95.E6.94.BE.E9.99.90.E5.88.B6"><b>卡券投放限制</b></span></h3> 
      <p><font color="#FF0000"> 公众号会话环境内仅支持调起该公众号域名下的卡券。未经平台允许不支持在公众号会话内推送其他商户的卡券，公众号会话外（如朋友圈、对话环境）无此限制。 </font> </p>
      <p><b>特别注意事项</b> </p>
      <p>公众号的对话框中发生的行为以及从公众号对话框跳转的网页链接均处于该公众号的会话环境内。 </p> 
      <h3> <span class="mw-headline" id=".E7.BC.96.E7.A0.81.E8.A7.84.E5.88.99"><b>编码规则</b></span></h3> 
      <p>所有API接口POST的数据只支持utf8编码，否则会返回报错。 </p> 
      <h3> <span class="mw-headline" id=".E8.81.94.E7.B3.BB.E6.88.91.E4.BB.AC"><b>联系我们</b></span></h3> 
      <p>遇到卡券开发问题，可以通过邮箱weixin_card@foxmail.com 联系我们。也可以加入开发者QQ交流群 512568283，验证请务必说明商家名及业务。 </p> 
      <h1> <span class="mw-headline" id=".E5.8D.A1.E5.88.B8.E6.9C.AF.E8.AF.AD.E4.BB.8B.E7.BB.8D"><b>卡券术语介绍</b></span></h1> 
      <p>以下是卡券开发过程中需要了解的关键概念： </p> 
      <table border="1" cellspacing="0" cellpadding="2" align="center" width="700px"> 
       <tbody>
        <tr> 
         <th style="width:350px">参数名 </th> 
         <th>描述 </th>
        </tr> 
        <tr> 
         <td> cardid </td> 
         <td> 卡券ID。一个卡券ID对应一类卡券，包含了相应库存数量的Code码。 </td>
        </tr> 
        <tr> 
         <td> code </td> 
         <td> 卡券Code码。一张卡券的唯一标识，核销卡券时使用此串码，支持商户自定义。 </td>
        </tr> 
        <tr> 
         <td> openid </td> 
         <td> 用户在该公众号下的唯一身份。 </td>
        </tr> 
        <tr> 
         <td> access_token </td> 
         <td> 调用接口的凭证，有效时间为7200s，通过<a href="../14/9f9c82c1af308e3b14ba9b973f99a8ba.html" class="external text" rel="nofollow">获取access_token接口</a>获取。 </td>
        </tr> 
        <tr> 
         <td> api_ticket </td> 
         <td> 调用微信卡券接口时签名的临时票据，通过<a href="../11/74ad127cc054f6b80759c40f77ec03db.html#.E8.8E.B7.E5.8F.96api_ticket" class="external text" rel="nofollow">获取api_ticket接口</a>获取。 </td>
        </tr> 
        <tr> 
         <td> card_ext </td> 
         <td> 可扩张卡券的附加信息。 </td>
        </tr> 
        <tr> 
         <td> outer_id </td> 
         <td> <a href="../5/f942979ef2f0d313d4d36e3a26766a3d.html#.E6.8A.95.E6.94.BE.E6.B8.A0.E9.81.93.E6.95.B0.E6.8D.AE.E7.BB.9F.E8.AE.A1" class="external text" rel="nofollow">领券渠道的场景值</a>。支持商户自定义场景值填入card_ext进行卡券投放，当用户领取时会将相应场景值通过事件通知商户。 </td>
        </tr> 
        <tr> 
         <td> 事件推送 </td> 
         <td> 在<a href="../16/28b34ee91675a04cb24853768debded4.html" class="external text" rel="nofollow">卡券通过审核、卡券被领取、卡券被删除、卡券被核销</a>时，均会推送事件通知开发者，接收地址为公众平台开发者中心填写的服务器URL。 </td>
        </tr> 
        <tr> 
         <td> 自定义入口 </td> 
         <td> 通过API创建卡券支持商户自定义卡券详情页跳转外链的单元。 </td>
        </tr> 
       </tbody>
      </table> 
      <h1> <span class="mw-headline" id=".E5.8D.A1.E5.88.B8.E8.B5.84.E6.96.99.E5.8C.85.E4.B8.8B.E8.BD.BD"><b>卡券资料包下载</b></span></h1> 
      <p>开发者可下载<a href="https://mp.weixin.qq.com/zh_CN/htmledition/comm_htmledition/res/cardticket/wx_card_document.zip" class="external text" rel="nofollow">卡券接口资料包</a>： </p>
      <p><br> - 创建&amp;签名工具SDK； </p>
      <p>- 卡券接口调用流程图； </p>
      <p>- 新增接口特性说明； </p>
      <p>- SDK for Android； </p>
      <p>- SDK for iOS； </p> 
      <!-- 
NewPP limit report
Preprocessor node count: 71/1000000
Post-expand include size: 0/2097152 bytes
Template argument size: 0/2097152 bytes
Expensive parser function count: 0/100
--> 
      <div class="printfooter">
        取自“
       <a href="../10/597cb57750f375a4b37e2536fd3331ea.html">../10/597cb57750f375a4b37e2536fd3331ea.html</a>”
      </div> 
      <!-- /bodytext --> 
      <!-- catlinks --> 
      <div id="catlinks" class="catlinks catlinks-allhidden"></div> 
      <!-- /catlinks --> 
      <div class="visualClear"></div> 
     </div> 
     <!-- /bodyContent --> 
    </div> 
    <!-- /content --> 
   </div> 
  </div> 
  <!-- footer --> 
  <div class="foot" id="footer"> 
   <ul class="links ft" id="footer-places"> 
    <li class="links_item no_extra" id="footer-about"><a target="_blank" href="http://www.tencent.com/zh-cn/index.shtml">关于腾讯</a></li> 
    <li class="links_item" id="footer-policy"> <a target="_blank" href="#">服务协议</a></li> 
    <li class="links_item" id="footer-contactus"><a target="_blank" href="http://kf.qq.com/special_auto/weixin.html">客服中心</a></li> 
    <li class="links_item" id="footer-contactus"><a href="http://crm2.qq.com/page/portalpage/wpa.php?uin=40012345&amp;f=1&amp;ty=1&amp;ap=000011:400792:|f:Ggzpt1" target="_blank">在线客服</a></li> 
   </ul> 
   <ul id="footer-icons" class="noprint"> 
    <li id="footer-poweredbyico"> <a href="http://www.mediawiki.org/"><img src="../static/assets/1360f2593ddc8c336d455df43678bb00.png" alt="Powered by MediaWiki" width="88" height="31"></a> </li> 
   </ul> 
   <p class="copyright">Copyright&nbsp;© 2012-2016 Tencent. All Rights Reserved.</p> 
  </div> 
  <!-- /footer --> 
  <script src="../static/8de4f51dbc81a02504e69db45b414107.css"></script> 
  <script>if ( window.mediaWiki ) {
	mediaWiki.config.set({"wgCanonicalNamespace": "", "wgCanonicalSpecialPageName": false, "wgNamespaceNumber": 0, "wgPageName": "微信卡券接口说明", "wgTitle": "微信卡券接口说明", "wgAction": "view", "wgArticleId": 161, "wgIsArticle": true, "wgUserName": null, "wgUserGroups": ["*"], "wgCurRevisionId": 3828, "wgCategories": [], "wgBreakFrames": false, "wgRestrictionEdit": [], "wgRestrictionMove": []});
}
</script> 
  <script>if ( window.mediaWiki ) {
	mediaWiki.loader.load(["mediawiki.util", "mediawiki.legacy.wikibits", "mediawiki.legacy.ajax"]);
	mediaWiki.loader.go();
}
</script> 
  <script>if ( window.mediaWiki ) {
	mediaWiki.user.options.set({"ccmeonemails":0,"cols":80,"contextchars":50,"contextlines":5,"date":"default","diffonly":0,"disablemail":0,"disablesuggest":0,"editfont":"default","editondblclick":0,"editsection":1,"editsectiononrightclick":0,"enotifminoredits":0,"enotifrevealaddr":0,"enotifusertalkpages":1,"enotifwatchlistpages":0,"extendwatchlist":0,"externaldiff":0,"externaleditor":0,"fancysig":0,"forceeditsummary":0,"gender":"unknown","hideminor":0,"hidepatrolled":0,"highlightbroken":1,"imagesize":2,"justify":0,"math":1,"minordefault":0,"newpageshidepatrolled":0,"nocache":0,"noconvertlink":0,"norollbackdiff":0,"numberheadings":0,"previewonfirst":0,"previewontop":1,"quickbar":1,"rcdays":7,"rclimit":50,"rememberpassword":0,"rows":25,"searchlimit":20,"showhiddencats":0,"showjumplinks":1,"shownumberswatching":1,"showtoc":1,"showtoolbar":1,"skin":"vector","stubthreshold":0,"thumbsize":2,"underline":2,"uselivepreview":0,"usenewrc":0,"watchcreations":0,"watchdefault":0,"watchdeletion":0,
	"watchlistdays":3,"watchlisthideanons":0,"watchlisthidebots":0,"watchlisthideliu":0,"watchlisthideminor":0,"watchlisthideown":0,"watchlisthidepatrolled":0,"watchmoves":0,"wllimit":250,"variant":"zh-cn","language":"zh-cn","searchNs0":true,"searchNs1":false,"searchNs2":false,"searchNs3":false,"searchNs4":false,"searchNs5":false,"searchNs6":false,"searchNs7":false,"searchNs8":false,"searchNs9":false,"searchNs10":false,"searchNs11":false,"searchNs12":false,"searchNs13":false,"searchNs14":false,"searchNs15":false});;mediaWiki.loader.state({"user.options":"ready"});
}
</script> 
  <!-- fixalpha --> 
  <script type="text/javascript"> if ( window.isMSIE55 ) fixalpha(); </script> 
  <!-- /fixalpha --> 
  <!-- Served in 0.097 secs. --> 
  <script type="text/javascript">
		// @cunjinli
		setTimeout(function() {
			$("#mw-panel .portal .body li a").each(function() {
				var href = $(this).attr("href"),
				    idx = href.lastIndexOf("/");
				if (!/\.html$/.test(href)) return;

				if (idx>=0) href = href.substr(idx+1);
				var r = new RegExp(href+"$");
				if (r.test(location.href)) {
				    $(this).closest(".portal").find("h5").click();
				    return false;
				}
			});
		}, 100);
		</script>   
  <!-- Welcome to ask gy-team -->
  <!-- so -->
 </body>
</html>